package WinterVacation.Day6;

public class Num1 {
    public static void main(String[] args) {
        System.out.println(isPower(8));

    }
    public static boolean isPower(int n){
        if(n < 1){
            return false;
        }
        int num = 1;
        while(num <= n){
            if(num == n){
                return true;
            }
            num <<= 1;
        }
        return false;
    }
}
